def test001():
    a = ["a", "b", "c", "d"]
    d = {v: index for index, v in enumerate(a)}
    c = 5
    print("d = ", d, ", c = ", c)
    print(f"d = {d}, c= {c}")  # f 打印 是 py3.6 新增的
    # 遍历dict d
    for k in d:
        print(f"k = {k}, d[k] = {d[k]}")


def test002(b, *args, a=None):
    """

    :param b: 无名参数
    :param args: 接收无名参数，是一个元组
    :param a: 有名参数
    :return:
    """
    print(b, args, a)


if __name__ == '__main__':
    test001()
    test002(1, 2, 3, 4, 5, a=1)
